Unauthorized communication detection method, unauthorized communication detection system, and non-transitory computer-readable recording medium storing a program

ABSTRACT

An unauthorized activity detection method in an onboard network system. The detection method includes determining whether or not a message sent out onto the network is an attack message, saving information relating to the attack message in at least one memory in a case where the message is an attack message, identifying a communication pattern from information relating to the attack message, and determining whether or not the message matches a communication pattern. The determination of whether an attack message and determination of whether matching a communication pattern are executed on each of a plurality of messages received from the network. In the determining of whether an attack message executed on a message received after executing of determining of whether matching a communication pattern, results of the determination of whether an attack message that has already be executed are used.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 16/244,160, filed Jan. 10, 2019, which is a continuation ofInternational Pat. Appl. No. PCT/JP2018/007102, filed Feb. 27, 2018,which claims the benefit of Japanese Pat. Appl. Nos. 2018-019993, filedFeb. 7, 2018, and 2017-076568, filed Apr. 7, 2017. The disclosure ofeach of the above-noted applications is expressly incorporated herein byreference in its entirety.

BACKGROUND 1. Technical Field

The present invention relates to a detection method for detectingcommunication of an unauthorized message on an onboard network.

2. Description of the Related Art

In recent years, a great number of devices called electronic controlunits (ECU) have been placed in systems in automobiles. A networkconnecting these ECUs is referred to as an onboard network. Manycommunication standards exist for onboard networks. One of the mostmainstream of these onboard networks is a standard called ControllerArea Network (hereinafter, CAN).

In a network according to the CAN standard (hereinafter also referred toas CAN network), a communication path (bus) is configured of two cables,and ECUs connected to the bus are also referred to as nodes. Each nodeconnected to the bus transmits and receives data in increments calledframes or messages. No identifiers indicating the transmissiondestination or transmission source of data is used in CAN. A node thattransmits frames (hereinafter also referred to as transmitting node)attaches an ID called a message ID to each message, indicating the typeof the message, and transmits, i.e., sends signals out onto the bus. Anode that receives messages (hereinafter also referred to as receivingnode) receives, i.e., reads signals from the bus, only regardingmessages including a message ID decided beforehand. Messages of the sameID are transmitted at a predetermined constant cycle.

As described above, each of the ECUs of which a great number areincluded in a system within an automobile are connected to the CANnetwork, and operate while exchanging various messages with each other.Now, a situation can occur where an ECU that has external communicationfunctions from the CAN network is taken over by being externallyattacked or the like, and starts to transmit unauthorized messages(hereinafter, attack messages) to the CAN network. Such an ECU that hasbeen taken over (hereinafter, also referred to as unauthorized ECU) canunauthorizedly control the automobile by posing as another ECU, forexample, and transmitting attack messages. An example of a method todetect such so-called spoofing attacks is described in InternationalPublication No. 2014/115455.

SUMMARY

The above-described related art has required further improvement.

In one general aspect, the techniques disclosed here feature anunauthorized communication detection method in an onboard network systemthat is executed by an information processing system including at leastone memory. The onboard network system includes a network and one ormore electronic control units connected to the network. The unauthorizedcommunication detection method includes: executing unauthorized activitydetection of determining of whether or not a message sent out onto thenetwork is an attack message; saving information relating to the attackmessage in the at least one memory in a case where the message is anattack message; identifying a communication pattern occurring on theonboard network, from information relating to the attack message; andexecuting communication pattern determination of determining whether ornot the message matches a communication pattern identified in theidentifying. At least the executing unauthorized activity detection andthe executing communication pattern determination are executed on eachof a plurality of messages that have been successively sent out onto thenetwork and received, and in the unauthorized activity detectionexecuted on a message received after executing of the communicationpattern determination, determination results of this communicationpattern determination that has already been executed are used fordetermining whether or not this message is an attack message.

According to the present disclosure, further improvement can berealized.

It should be noted that general or specific embodiments may beimplemented as a system, a method, an integrated circuit, a computerprogram, a storage medium, or any selective combination thereof.

Additional benefits and advantages of the disclosed embodiments willbecome apparent from the specification and drawings. The benefits and/oradvantages may be individually obtained by the various embodiments andfeatures of the specification and drawings, which need not all beprovided in order to obtain one or more of such benefits and/oradvantages.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the overall configuration of anonboard network system according to a first embodiment;

FIG. 2 is a diagram illustrating a data frame format in the CANprotocol;

FIG. 3 is a block diagram illustrating an example of the functionalconfiguration of a gateway included in the onboard network systemaccording to the present disclosure;

FIG. 4 is a diagram illustrating an example of the data configuration ofa reception ID list in the first embodiment;

FIG. 5 is a diagram illustrating an example of the data configuration oftransfer rules stored in the gateway in the first embodiment;

FIG. 6 is a block diagram illustrating an example of the functionalconfiguration of an unauthorized activity detection processing functiongroup in the first embodiment;

FIG. 7 is a block diagram illustrating the functional configuration ofan unauthorized activity detection unit according to the firstembodiment;

FIG. 8 is a block diagram illustrating another example of the functionalconfiguration of an unauthorized activity detection processing functiongroup in the first embodiment;

FIG. 9 is a block diagram illustrating an example of the functionalconfiguration of an ECU included in the aforementioned onboard networksystem according to the first embodiment;

FIG. 10 is a flowchart illustrating an example of unauthorized activitydetection processing according to the first embodiment;

FIG. 11 is a flowchart illustrating an example of transfer processingaccording to the first embodiment;

FIG. 12 is a block diagram illustrating an example of the functionalconfiguration of an unauthorized activity detection processing functiongroup according to a second embodiment;

FIG. 13 is a block diagram illustrating another example of thefunctional configuration of an unauthorized activity detectionprocessing function group according to the second embodiment;

FIG. 14 is a flowchart illustrating an example of unauthorized activitydetection processing according to the second embodiment;

FIG. 15 is a block diagram illustrating the overall configuration of anonboard network system according to a third embodiment;

FIG. 16 is a block diagram illustrating another example of thefunctional configuration of a gateway included in the onboard networksystem according to the present disclosure;

FIG. 17 is a block diagram illustrating an example of the functionalconfiguration of an unauthorized activity detection processing functiongroup according to the third embodiment;

FIG. 18 is a block diagram illustrating another example of thefunctional configuration of an unauthorized activity detectionprocessing function group according to the third embodiment;

FIG. 19 is a block diagram illustrating an example of the configurationof a server according to the third embodiment;

FIG. 20 is a block diagram illustrating an example of the functionalconfiguration of an unauthorized activity detection processing functiongroup according to a modification;

FIG. 21 is a block diagram illustrating another example of thefunctional configuration of an unauthorized activity detectionprocessing function group according to a modification;

FIG. 22 is a block diagram illustrating another example of thefunctional configuration of an unauthorized activity detectionprocessing function group according to a modification;

FIG. 23 is a block diagram illustrating another example of thefunctional configuration of an unauthorized activity detectionprocessing function group according to a modification;

FIG. 24 is a block diagram illustrating an example of the functionconfiguration of an ECU according to a modification;

FIG. 25 is a block diagram illustrating an example of the functionconfiguration of an ECU according to a modification; and

FIG. 26 is a block diagram illustrating an example of the functionconfiguration of an ECU according to a modification.

DETAILED DESCRIPTION

Underlying Knowledge Forming Basis of the Present Disclosure

When transmission of an attack message from an unauthorized ECU starts,normal messages and attack messages having the same ID coexist in theCAN network. In such a state, there are cases where, as a result of thetransmission timing of normal messages and the transmission timing ofattack messages being very close to each other, or being intentionallybrought close together by the attacker, the transmission timing ofattack messages falls within a tolerance margin. In such a case,distinguishing normal messages and attack messages is difficult, and theprobability of erroneous detection increases. The same thing can occurnot only regarding transmission timings of messages but also regardingdata values included in the messages.

Accordingly, an unauthorized communication detection method in anonboard network system that is executed by an information processingsystem including at least one memory. The onboard network systemincludes a network and one or more electronic control units connected tothe network. The unauthorized communication detection method includes:executing unauthorized activity detection of determining whether or nota message sent out onto the network is an attack message; savinginformation relating to the attack message in the at least one memory ina case where the message is an attack message; identifying acommunication pattern occurring on the onboard network, from informationrelating to the attack message; and executing communication patterndetermination of determining whether or not the message matches acommunication pattern identified in the identifying. At least theexecuting unauthorized activity detection and the executingcommunication pattern determination are executed on each of a pluralityof messages that have been successively sent out onto the network andreceived, and in the unauthorized activity detection executed on amessage received after executing of the communication pattern detection,determination results of this communication pattern determination thathas already been executed are used for determining whether or not thismessage is an attack message.

Accordingly, whether a message sent out onto the onboard network systemis an attack message or not is determined in light of patternsreflecting features of attack messages. As a result, determination ofwhether individual messages are attack messages is executed with higherprecision.

Also, for example, in the identifying, a pattern relating to change in adata value included in the plurality of messages may be identified asthe communication pattern. More specifically, the pattern relating tochange in the data value may be a pattern relating to whether or notthere is change in the data value included in a plurality of messagesrepresenting a data amount of the same type included in the partialityof messages, a pattern relating to amount of increase or decrease of adata amount included in the plurality of messages representing the dataamount of the same type, or a pattern relating to difference or ratiobetween data values included in messages representing the data amount ofthe same type and data values included in messages representing a dataamount of another type.

Accordingly, determination of whether or not individual messages areattack messages is performed in light of patterns relating to change indata values among messages or whether or not there are changes, andaccordingly can be executed with higher precision.

Also, for example, in the identifying, a communication pattern relatingto communication timing of the plurality of messages may be identifiedas the communication pattern. More specifically, the pattern relating tocommunication timing of the plurality of messages may be a patternrelating to intervals of transmission time of the plurality of messagesrepresenting a data amount of the same type included in the partialityof messages, or difference in transmission times among a plurality ofmessages representing the data amount of the same type or betweenmessages representing data amounts of different types.

Accordingly, determination of whether or not individual messages areattack messages is performed in light of patterns relating to receptionintervals among messages, and accordingly can be executed with higherprecision.

Also, for example, the unauthorized communication detection method mayfurther include calculating a prediction value of data value included ina message to be received next. In the identifying, the communicationpattern may be identified by obtaining a model, obtained by executingstatistical processing on information relating to the attack message, asthe communication pattern, the calculating may be performed using thecommunication pattern, and in the executing communication patterndetermination, whether or not the received message matches thecommunication pattern may be determined based on the results ofcomparison between the prediction value and the data value that thereceived message includes. More specifically, in the identifying, anautoregressive (AR) model, autoregressive-moving-average (ARMA) model,Hidden Markov Model (HMM), or Bayesian model may be obtained as themodel.

Accordingly, data values predicted to be values that an attack messagecan assume are used for determination of whether or not individualmessages are attack message, so the probability of successful detectionis higher even for attacks that do not follow attack patterns that haveactually occurred. Accordingly, the safety of the onboard network systemcan be protected in a surer manner.

Also, for example, in the saving, information relating to a gray messageregarding which determination of whether an attack message or not couldnot be made in the executing unauthorized activity detection may befurther stored in the at least one memory, and in the identifying, thecommunication pattern may be obtained by further executing thestatistical processing on information relating to the gray message.

Accordingly, the determination of a message regarding whichdetermination of whether or not an attack message is difficult istemporarily suspended, and determination can be made at a later time.The results of such determination made at a later time are used tostrengthen communication patterns used in determination later, enablingexecution of determination with higher precision.

Also, for example, the unauthorized communication detection method mayfurther include recognizing whether or not an automatic driving functionthat a vehicle in which the onboard network system is installed has, forassisting or substituting at least part of driving actions of thevehicle by the driver, is being executed. The saving may be executedwhen recognition is made in the recognizing that the automatic drivingfunction is not being executed, and the executing communication patterndetermination may be executed when recognition is made in therecognizing that the automatic driving function is being executed.

Accordingly, this determination is performed when the vehicle is in astate where determination of whether an attack message or not isrelatively easy, whereby strengthening of communication patterns can beefficiently performed, thereby promoting improvement in precision ofdetermination.

Also, for example, the attack message may be sent out onto the networkby one of the one or more electronic control units included in theonboard network system, with at least part of the executing unauthorizedactivity detection, the saving, the identifying, and the executingcommunication pattern determination being executed by an electroniccontrol unit included on a different onboard network system from theelectronic control unit sending out the attack message, or by a gatewaythat the onboard network system further includes.

Accordingly, when an ECU within the onboard network system is taken overby an attacker and sends out an attack message, for example,unauthorized communication is detected.

Also, for example, at least one of the one or more electronic controlunits included in the onboard network system may have a transmissiondata obtaining unit that obtains data transmitted from outside of theonboard network system, the electronic control unit having thetransmission data obtaining unit executing at least the executingunauthorized activity detection regarding a message included in datatransmitted from outside of the onboard network system.

This enables intrusion into the onboard network system, by an attackmessage attempting to be externally sent in, to be suppressed.

Also, an unauthorized activity detection system according to an aspectof the present disclosure is unauthorized communication detection systemto detect unauthorized control in an onboard network system. The onboardnetwork system includes a network and one or more electronic controlunits connected to the network. The unauthorized communication detectionsystem includes at least one processor, and one or more memoriesincluding at least one sent of instruction that, when executed by the atleast one processor, causes the at least one processor to performoperations including executing unauthorized activity detection ofdetermining whether or not a message sent out onto the network is anattack message, saving information relating to the attack message in atleast one memory in a case where the message is an attack message,identifying a communication pattern occurring on the onboard network,from information relating to the attack message, and executingcommunication pattern determination to determine whether or not themessage matches a communication pattern that has been identified. Atleast the unauthorized activity detection and the communication patterndetermining are executed on each of a plurality of messages that havebeen successively sent out onto the network, and in the unauthorizedactivity detection executed on a message sent out after executing of thecommunication pattern determination, determination results of thiscommunication pattern determination that has already been executed areused for determining whether or not this message is an attack message.

Accordingly, whether a message sent out onto the onboard network systemis an attack message or not is determined in light of patternsreflecting features of attack messages. As a result, determination ofwhether individual messages are attack messages is executed with higherprecision.

Also, according to an aspect of the present disclosure, a non-transitorycomputer-readable recording medium stores a program causing anunauthorized communication detection system to detect unauthorizedcommunication in an onboard network system. The unauthorizedcommunication detection system includes at least one processor and atleast one memory. The onboard network system includes a network and oneor more electronic control units connected to the network. When executedby the at least one processor, the program causes the at least oneprocessor to perform operations including executing unauthorizedactivity detection of determining whether or not a message sent out ontothe network is an attack message, saving information relating to theattack message in the at least one memory in a case where the message isan attack message, identifying a communication pattern occurring on theonboard network, from information relating to the attack message, andexecuting communication pattern determination to determine whether ornot the message matches a communication pattern that has beenidentified. At least the unauthorized activity detection and thecommunication pattern determining are executed on each of a plurality ofmessages that have been successively sent out onto the network. In theunauthorized activity detection executed on a message sent out afterexecuting of the communication pattern determination, determinationresults of this communication pattern determination that has alreadybeen executed are used for determining whether or not this message is anattack message.

Accordingly, whether a message sent out onto the onboard network systemis an attack message or not is determined in light of patternsreflecting features of attack messages. As a result, determination ofwhether individual messages are attack messages is executed with higherprecision.

Embodiments will be described below in detail with reference to thedrawings. Note that the embodiments described below are allcomprehensive or specific examples of the present disclosure.Accordingly, values, shapes materials, components, placements andconnected states of components, steps, the order of steps, and so forth,illustrated in the following embodiments, are only exemplary, and do notrestrict the present disclosure. Components in the following embodimentswhich are not included in an independent Claim are described as beingoptionally includable components.

First Embodiment

1. Overview

A first embodiment will be described with reference to the drawings, byway of an example of an onboard network system where determination ismade regarding whether a message being transmitted is an attack messageor not.

1.1 Overall Configuration of Onboard Network System

FIG. 1 is a block diagram illustrating the overall configuration of anonboard network system 10. The onboard network system 10 is configuredof a CAN network, and includes ECUs 100 (ECU 100 a, ECU 100 b, ECU 100c, and ECU 100 d in the drawings, also collectively or an unspecifiedpart thereof being referred to as ECU 100 hereinafter), a bus 200 (bus200 a and 200 b in the drawings, also collectively or an unspecified onethereof being referred to as bus 200), and a gateway 300.

The ECU 100 a is connected to an engine 101, the ECU 100 b to brakes102, the ECU 100 c to a door open/close sensor 103, and the ECU 100 d toa window open/close sensor 104, respectively. The ECUs 100 obtainsstates of devices to which they are respectively connected, andperiodically output the obtained states to the bus 200. For example, theECU 100 a obtains revolutions which is a state of the engine 101, andattaches a predetermined ID to a message including a data valuerepresenting the revolutions, and sends this out onto the bus 200. TheECUs 100 read out messages transmitted by other ECUs 100 from the bus200, and selectively receive in accordance with IDs attached to themessages. This selective reception will be described later.

The gateway 300 is connected to the bus 200 a to which the ECU 100 a andECU 100 b are connected, and to the bus 200 b to which the ECU 100 c andECU 100 d are connected. The gateway 300 has a function of transferringa message received from one bus to the other bus. The gateway 300 alsois a node on the CAN network.

Note that the onboard network system 10 is an example for describing anobject to which an unauthorized activity detection system and so forththat determines whether or not a message is an attack message isapplicable, and that the object of application thereof is not restrictedto the onboard network system 10.

1.2 Data Format of Messages

FIG. 2 is a diagram illustrating a format of a CAN protocol message. Amessage according to a standard ID format in the CAN protocol is shownhere. The message is made up of a Start OF Frame (also referred to asSOF in the drawing and hereinafter), an ID field, a Remote TransmissionRequest (also referred to as RTR in the drawing and hereinafter), anIDentifier Extension (also referred to as IDE in the drawing andhereinafter), a reserved bit (also referred to as r in the drawing andhereinafter), a data length code (also referred to as DLC in the drawingand hereinafter), a data field, a Cyclic Redundancy Check (also referredto as CRC in the drawing and hereinafter) sequence, a CRC delimiter (DELto the left in the drawing), an Acknowledgement (also referred to as ACKin the drawing and hereinafter) slot, an ACK delimiter (DEL to the rightin the drawing), and an end of frame (also referred to as EOF in thedrawing and hereinafter).

The SOF is 1-bit dominant. Dominant means the state where voltage isapplied to two cables making up a bus in a CAN network using a digitalformat for transmission of data to transmit the value “0”, and the value“0” that is transmitted. In comparison with this, recessive means thestate where voltage is applied to two cables making up a bus to transmitthe value “1”, and the value “1” that is transmitted. In a case where avalue of “0” and a value of “1” are transmitted from two nodes to a busat the same time, the value of “0” is given priority. The bus isrecessive when idle. The ECUs 100 start transmission of a message bychanging the state of the bus 200 from recessive to dominant, and theother ECUs 100 read this change and synchronize. The portions indicatedby solid lines in FIG. 2 representing dominant and recessive making upthe message, can assume the values of dominant and recessive. The SOF isdominant fixed, so the dominant line is solid, and the recessive line isdotted.

The ID is an 11-bit value indicating the type of data that the messageincludes. CAN is designed such that during communication arbitrationamong messages where multiple nodes have started transmission at thesame time, messages with smaller ID values have higher priority.

The RTR is a 1-bit dominant indicating that the frame is a message (dataframe). IDE and r each are 1-bit dominant. DLC is a 4-bit valueindicating the length of the subsequent data field.

The data field is a value indicating the content of the datatransmitted, having a maximum length of 64 bits, and the length can beadjusted in 8-bit increments. Specifications regarding allocation oftransmitted data to this portion is dependent on vehicle type andmanufacturer.

The CRC sequence is a 15-bit value calculated from the transmissionvalues of the SOF, ID field, control field, and data field. The CRCdelimiter is a 1-bit recessive fixed sectioning symbol representing theend of the CRC sequence. The reception node compares the results ofcalculation from the SOF of the received message, ID field, controlfield, and data field, with this CRC sequence value, thereby judgingwhether or not there is an abnormality.

The ACK slot is 1-bit long, and the transmitting node transmitsrecessive at this portion. If the receiving node has been able tosuccessfully receive up to the CRC sequence, the receiving node returnsdominant as a confirmation response. Dominant is given priority, so ifcommunication of one message has been successfully performed up to theCRC sequence, the bus 200 during transmission of the ACK slot isdominant. The ACK delimiter is a 1-bit recessive fixed sectioning symbolrepresenting the end of the ACK slot. The EOF is 7-bit recessive fixed,indicating the end of the message.

1.3 Configuration of Gateway

FIG. 3 is a diagram illustrating the configuration of the gateway 300included in the onboard network system 10. The gateway 300 includes aframe transmission/reception unit 310, a frame interpreting unit 320, areception ID determining unit 330, a reception ID list storing unit 340,a frame processing unit 350, a transfer rule storing unit 360, anunauthorized activity detection processing function group 370, and aframe generating unit 380.

Note that these components are functional components, and that thegateway 300 is provided as an information processing device having aprocessing unit realized by a processor, a memory realized bysemiconductor memory or the like, and input/output unit realized by aninput/output port, and so forth, for example. The functional componentslisted above are realized by reading out and executing of programsstored in the memory by the processing unit, storing of predetermineddata by the storing unit, and transmission/reception of data via theinput/output unit, and combinations thereof.

The frame transmission/reception unit 310 transmits and receivesmessages following the CAN protocol to and from each of the busses 200 aand 200 b. More specifically, the frame transmission/reception unit 310reads out messages sent out onto the bus 200 one bit at a time, andtransfers the read messages to the frame interpreting unit 320. Theframe transmission/reception unit 310 also sends out messages one bit ata time to the busses 200 a and 200 b, in accordance with bus informationnotified from the frame generating unit 380. Transfer of messages amongthe busses 200 is executed by transmitting messages received from thebus 200 a to the bus 200 b, and transmitting messages received from thebus 200 b to the bus 200 a.

The frame interpreting unit 320 receives values of a message from theframe transmission/reception unit 310, and interprets a frame (message)by mapping to the fields of the CAN protocol. The frame interpretingunit 320 transfers a series of values judged to be values of the IDfield in this interpreting to the reception ID determining unit 330.

The frame interpreting unit 320 further decides, in accordance withdetermination results notified from the reception ID determining unit330 whether to transfer the value of the ID field of the message and thedata field appearing following the ID field to the frame processing unit350, or to cancel reception of the message.

In a case having judged that a message does not follow the CAN protocol,the frame interpreting unit 320 requests the frame generating unit 380to transmit an error frame. An error frame is a frame of a predeterminedformat stipulated by the CAN protocol, that differs from theabove-described message, and is transmitted from a node in a case of anerror occurring on the CAN network. Upon an error flag being sent outonto the bus, immediate transmission of messages on that network isinterrupted. In a case of having judged that an error frame transmittedby another node has been received, the frame interpreting unit 320discards the message being read.

The reception ID determining unit 330 receives the value of the ID fieldfrom frame interpreting unit 320, and performs determination of whetheror not to receive the message that has been read out, following the listof message IDs that the reception ID list storing unit 340 stores. Thereception ID determining unit 330 notifies the frame interpreting unit320 of the results of this determination.

The reception ID list storing unit 340 stores a list of message IDs thatthe gateway 300 receives (hereinafter, also referred to as reception IDlist). FIG. 4 is a diagram illustrating an example of the dataconfiguration of a reception ID list. Details of the reception ID listwill be described later using this example.

The frame processing unit 350 decides the bus that is the destination oftransfer in accordance with the ID of the received message, followingtransfer rules that the transfer rule storing unit 360 stores, and handsto the frame generating unit 380 the bus that is the destination oftransfer, the message ID notified from the frame interpreting unit 320,and the data to be transferred.

The frame processing unit 350 also, sends the message received from theframe interpreting unit 320 to the unauthorized activity detectionprocessing function group 370, and requests determination of whetherthat message is an attack message or not. The frame processing unit 350does not transfer a message regarding which determination has been madeat the unauthorized activity detection processing function group 370 tobe an attack message.

The transfer rule storing unit 360 stores rules relating to datatransfer for each bus (hereinafter also referred to as transfer rules).FIG. 5 is a diagram illustrating an example of the data configuration oftransfer rules. Details of transfer rules will be described later usingthis example.

The unauthorized activity detection processing function group 370 is afunction group that determines whether a message being received is anattack message. The details of the functional configuration included inthe unauthorized activity detection processing function group 370 willbe described later.

The frame generating unit 380 configures an error frame following arequest from the frame interpreting unit 320 to transmit an error frame,and sends it out to the frame transmission/reception unit 310.

The frame generating unit 380 also configures a message frame using themessage ID and data received from the frame processing unit 350 andsends this to the frame transmission/reception unit 310 along with thebus information.

1.4 Reception ID List

FIG. 4 is a diagram illustrating an example of the data configuration ofa reception ID list that is a list of message IDs that the gateway 300receives. In this example, IDs of messages that are the object of thegateway 300 to receive from the bus 200 and process are included in eachrow. In the settings of the reception ID list in this example, messagehaving message IDs of “1”, “2”, “3”, and “4” are received by the gateway300. Reception of messages having an ID not included in the reception IDlist is cancelled. Note that the values of IDs and the number of IDsincluded in the list in this example are exemplary for the sake ofdescription, and that this does not restrict the configuration of thereception ID list used by the gateway 300.

1.5 Transfer Rules

FIG. 5 illustrates an example of the data configuration of transferrules stored at the gateway 300. In this example, the combination oftransfer source bus and transfer destination bus of the message(indicated by names 200 a and 200 b the same as the reference numerals),and the ID of the message to be transferred, are included in each row.In the settings according to the transfer rules in this example, thegateway 300 transfers messages received from the bus 200 a to the bus200 b, regardless of what the ID is. Also, message received from the bus200 b are transferred to the bus 200 a only regarding messages of whichthe ID is “3”.

1.6 Configuration of Unauthorized Activity Detection Processing FunctionGroup

FIG. 6 is a block diagram illustrating the functional configuration ofthe unauthorized activity detection processing function group 370 thatthe gateway 300 has. The unauthorized activity detection processingfunction group 370 includes an unauthorized activity detecting unit 371,a message saving processing unit 372, an attack message informationstoring unit 373, a communication pattern identifying unit 374, and acommunication pattern determining unit 375.

Note that these functional components also are realized by reading outand executing of programs stored in the memory by the processing unit,storing of predetermined data by the storing unit, andtransmission/reception of data via the input/output unit, andcombinations thereof.

The unauthorized activity detecting unit 371 determines whether or not amessage received from the frame processing unit 350 is an attackmessage. The unauthorized activity detecting unit 371 has multiple typesof determining functions. The determining functions reference differentrules (omitted from illustration) set beforehand and stored in a memory,and determine whether received messages are checked using these rules,i.e., whether the messages match these rules. Whether or not thereceived message is an attack message is determined based on thedetermination results of the determining functions. If the receivedmessage is an attack message, the unauthorized activity detecting unit371 detects occurrence of unauthorized activity.

FIG. 7 illustrates the configuration of the unauthorized activitydetecting unit 371. FIG. 7 is a block diagram illustrating an example ofthe functional configuration of the unauthorized activity detecting unit371. In this example, the unauthorized activity detecting unit 371 hassix types of determining functions for checking predetermined points ofa message. Specifically, these are a function of checking the ID fieldof a message (ID determining function), a function of checking datalength of the message (data length determining function), a function ofchecking a cycle (time interval) of message transmission (transmissioncycle determining function), a function of checking the frequency of themessage being transmitted (transmission frequency determining function),a function of checking the value of the data field (data value) of themessage (data value determining function), and a function of recognizingthe state of the vehicle based on the determination results of thesedetermining functions, transmission cycle, frequency, data values,amounts of change in data values, and so forth, and checking the stateof the vehicle (vehicle state determining function). The unauthorizedactivity detecting unit 371 further has a comprehensive determinationfunction of comprehensively determining whether or not the receivedmessage is an attack message from the determination results of thesedetermining functions. The results of the comprehensive determinationfunction are the results of detection of unauthorized activity by theunauthorized activity detecting unit 371.

Note that the functional components that the gateway 300 has also arerealized by reading out and executing of programs stored in the memoryby the processing unit, storing of predetermined data by the storingunit, and transmission/reception of data via the input/output unit, andcombinations thereof, at the gateway 300.

Returning to the description in FIG. 6, the unauthorized activitydetecting unit 371 requests the communication pattern determining unit375 for determination of whether or not the received message matches thecommunication pattern of an attack message.

In a case of determining, in response to the determination results ofthe unauthorized activity detecting unit 371, that the received messageis an attack message and also needs to be saved, the message savingprocessing unit 372 stores in the attack message information storingunit 373 the received attack message, the time of reception of theattack message, difference in reception time as to another messagehaving the same ID or a particular different ID, and informationrelating to the attack message such as amount of change in data valuesand so forth.

The attack message information storing unit 373 stores the informationrelating to the attack message, regarding which it has been instructedto store by the message saving processing unit 372. Specifically, thisis stored in a memory that the gateway 300 has. The attack messageinformation storing unit 373 also outputs information relating to attackmessages stored therein, in response to a request from the communicationpattern identifying unit 374.

The communication pattern identifying unit 374 obtains informationrelating to attack messages from the attack message information storingunit 373, and identifies patterns seen in attack messages that have beenreceived (hereinafter, communication pattern).

A communication pattern is a pattern relating to change in data values,for example. More specific examples include a pattern relating towhether or not there is change in the same ID, i.e., values in a datafield representing the same type of data value (both cases of entirelyand cases of values of particular portions), amount of increase ordecrease, pattern relating to proportion or frequency, and patternrelating to difference or ratio as to data values of message of anotherparticular ID.

Also, for example, a communication pattern is a pattern relating tocommunication timing of an attack message, and examples include apattern relating to irregularity in intervals between actualtransmission times of multiple messages of the same ID, and a patternrelating to difference in transmission time among messages of a certainID, or between a message of a certain ID and another particular ID. As amore specific example, a pattern where an attack message is transmittedimmediately before or immediately after a legitimate message, or apattern where a legitimate message and an attack message are transmittedwith a certain amount of time therebetween, may be identified.

The communication pattern identifying unit 374 obtains informationrelating to attack messages from the attack message information storingunit 373 in order to identify such communication patterns. Informationrelating to attack messages is information used to identify theabove-described communication patterns, such as data values, receptiontimes, and so forth, of individual attack messages.

The communication pattern identifying unit 374 derives and identifiescommunication patterns such as described above, through comparison andstatistical processing and the like of the obtained information. Theamount of information relating to attack messages used foridentification may be decided taking into consideration the load andprecision of the identification processing, for example.

Also, after having identified the communication pattern, thecommunication pattern identifying unit 374 notifies the communicationpattern determining unit 375 of information indicating the communicationpattern obtained as the result of identification, and informationnecessary for determining that communication pattern. Informationnecessary for determining a communication pattern is, for example, ifthe pattern is that the value of a particular portion of the data fieldis a constant value, that portion and value, if the pattern is thatchange (increase or decrease) of data values is seen at a constant rate,that rate, and if the pattern is that the data value is a constantdifference as to the data value of a message of another particular ID,that constant difference.

Such communication pattern identification by the communication patternidentifying unit 374 can be executed at various types of timings. Forexample, the timing may be related to addition of information relatingto an attack message. More specifically, this may be executed each timeinformation relating to an attack message is newly saved in the attackmessage information storing unit 373, or may be executed wheninformation relating to attack messages saved in the attack messageinformation storing unit 373 reach a constant amount (volume or count).Also, this may be a timing not related to addition of informationrelating to attack messages. For example, this may be executed each timea predetermined amount of time elapses, or may be when the vehicle is ina predetermined state or when the state of the vehicle exhibits apredetermined change. Also, this may be when conditions combining suchstates are satisfied. The timing for executing identification may bedecided taking into consideration the load of processing foridentification, and the necessity to add or update communicationpatterns, for example.

The communication pattern determining unit 375 determines whether or notthe received message matches the communication pattern obtained as aresult of identification by the communication pattern identifying unit374, in response to the request from the unauthorized activity detectingunit 371. For determination regarding matching of the received messageto a communication pattern, the communication pattern determining unit375 uses, besides the received message that is the object for thedetermining, an older received message, information indicating anidentified communication pattern notified from the communication patternidentifying unit 374, information necessary for other determination ofcommunication pattern, and so forth, for example.

For example, determination of matching with a communication patternwhere a value at a particular portion of the data field is a constantvalue is performed based on whether or not the value of the data fieldin the received message matches the portion notified from thecommunication pattern identifying unit 374 and the value at thatportion.

Also for example, matching with a pattern where a data value isincreasing or decreasing at a constant rate or amount is performed bycalculating the difference or ratio between the data value of a messagereceived one back, and the data value of the message that is the objectof determination, and performing determination based on whether or notthe results of calculation are consistent with the rate or amount ofchange notified from the communication pattern identifying unit 374.

Also for example, matching with a pattern where a data value is aconstant difference or ratio as to a data value of a message of anotherparticular ID is performed by calculating the difference or ratiobetween the data value in the received message and the data value of themessage of another particular ID received at a corresponding cycle andperforming determination based on whether or not the results ofcalculation match the difference or ratio notified from thecommunication pattern identifying unit 374.

Also for example, matching with a pattern where an attack message istransmitted immediately before or immediately after another message, ora pattern of being transmitted after a certain amount of time haselapsed, is performed based on whether or not the difference between thetime of transmission of the other message and the time of transmissionof the received message that is the object of determination is withinthe predetermined range. Note that the other message may be a previousor following message of the same ID, or may be a message with anotherparticular ID.

Although the communication pattern identifying unit 374 identifies thecommunication pattern regarding the change in value of the data field orthe communication timing, and the communication pattern determining unit375 determines whether or not the received message matches thiscommunication pattern, but the configuration of the unauthorizedactivity detection processing function group that the gateway 300 has isnot restricted to this. The gateway 300 may have an unauthorizedactivity detection processing function group 370 a further including acommunication pattern predicting unit 376 a as illustrated in FIG. 8 forexample, instead of the unauthorized activity detection processingfunction group 370. FIG. 8 is a block diagram illustrating anotherexample of the function configuration of the unauthorized activitydetection processing function group according to the present embodiment.Functional components of the unauthorized activity detection processingfunction group 370 a that are in common with those in the unauthorizedactivity detection processing function group 370 are denoted by commonreference numerals, and detailed description thereof will be omitted.

In FIG. 8, a communication pattern identifying unit 374 a usesstatistical processing or probability theory to obtain a model ofinformation regarding the attack message, such as an AR model, ARMAmodel, HMM, or Bayesian model or the like, and takes that model as acommunication pattern. The communication pattern predicting unit 376 auses the model identified by the communication pattern identifying unit374 a as a communication pattern, and calculates a prediction valuerelating to the data value or communication timing of a message to bereceived.

A communication pattern determining unit 375 a determines whether or notthis received message matches the communication pattern from predictionvalues calculated by the communication pattern predicting unit 376 a,and information relating to the received message. Note that thecommunication pattern determining unit 375 and communication patterndetermining unit 375 a have been described so far regarding determiningwhether or not a communication pattern is matched. This term “match” isnot restricted to the meaning of matching only being agreement in datavalues or times being compared. For example, the term “match” is used inthe present disclosure intending the meaning of being determined to bematching when within a predetermined error margin.

For example, matching with a communication pattern where the value of aparticular portion of the data field is constant may be determined basedon whether or not within a margin designed from that value beforehand,and not whether or not that constant value is agreed with.

Also, for example, matching with a communication pattern where the datavalue increases at a constant rate may be determined based on whether ornot within a margin designed beforehand from the value of the results ofhaving increased at that contrast rate. In the same way, matching with acommunication pattern where the data value decreases at a constant ratemay be determined based on whether or not within a margin designedbeforehand from the value of the results of having decreased at thatcontrast rate.

Also, for example, matching with a communication pattern which is avalue where a certain value has been added to the data value of amessage of another ID may be determined based on whether within a margindesigned beforehand from the value of the results of having added acertain ID to the data value of the message of another ID. In the sameway, matching with a communication pattern which is a value where acertain value has been subtracted from the data value of a message ofanother ID may be determined based on whether or not within a margindesigned beforehand from the value of the results of having subtracted acertain value from the data value of the message of another ID.

Also, for example, matching with a communication pattern where theattack message is transmitted immediately prior to transmission ofanother message may be determined based on whether or not within amargin designed beforehand from a point in time immediately before thathas been defined beforehand. In the same way, matching with acommunication pattern where the attack message is transmittedimmediately after transmission of another message may be determinedbased on whether not within a margin designed beforehand from a point intime immediately after that has been defined beforehand. Matching with acommunication pattern where the attack message is transmitted after acertain amount of time has elapsed after transmission of another messagemay be determined based on whether not within a margin designedbeforehand from a point in time where a certain amount of time haselapsed from transmission of the other message.

Further, in a case where a data value is predicted by the communicationpattern predicting unit 376 a, whether or not a communication pattern ismatched may be determined based on whether not the data value of thereceived message is within a margin designed beforehand from thepredicted value. Also, in a case where a communication timing ispredicted by the communication pattern predicting unit 376 a, whether ornot a communication pattern is matched may be determined based onwhether not transmission or reception time of a received message, ordifference as to transmission or reception time of another message, isat or below a threshold value set beforehand.

Although the message saving processing unit 372 has been described assaving information relating to an attack message in a case where areceived message is an attack message and saving is determined to benecessary, this is not restrictive. In a case where information relatingto a normal message is also necessary for identification by thecommunication pattern identifying unit 374 or communication patternidentifying unit 374 a, the message saving processing unit 372 may alsosave information relating to a normal message as well. In this case, thedetermination results by the unauthorized activity detecting unit 371regarding each message, for example, may also be saved together, asinformation relation to each message.

Received messages are saved in the memory of the gateway 300. However,the capacity of the memory is finite, so with regard to necessity ofsaving messages, in a case where an identification method is used thatis capable of identifying communication patterns even based oninformation decimated attack messages for example, whether or not savingof individual attack messages is determined so that the count ofmessages being saved is unnecessarily great. Also, message savingmanagement may be performed by a first-in first-out method, where theupper limit of the count or capacity of messages stored in the memory isset beforehand, and each time a message that is the object of savingoccurs, an old message is deleted.

1.7 Configuration of ECUs

FIG. 9 is a block diagram illustrating the function configuration of theECUs 100 included in the onboard network system 10. Each ECU 100includes a frame transmission/reception unit 110, a frame interpretingunit 120, a reception ID determining unit 130, a reception ID liststoring unit 140, a frame processing unit 150, a data obtaining unit170, and a frame generating unit 180.

Note that these components are functional components, and that the ECU100 is provided as an information processing device having a processingunit realized by a processor, a memory realized by semiconductor memoryor the like, and input/output unit realized by an input/output port, andso forth, for example. The functional components listed above arerealized by reading out and executing of programs stored in the memoryby the processing unit, storing of predetermined data by the storingunit, and transmission/reception of data via the input/output unit, andcombinations thereof.

The frame transmission/reception unit 110 transmits and receivesmessages to and from the bus 200 following the CAN protocol. Morespecifically, the frame transmission/reception unit 110 reads outmessages sent out onto the bus 200 one bit at a time, and transfers themessages that have been read out to the frame interpreting unit 120. Theframe transmission/reception unit 110 sends out messages regarding whichnotification has been received from the frame generating unit 180 to thebus 200.

The frame interpreting unit 120 receives the values of a message fromthe frame transmission/reception unit 110, and interprets the frame(message) by mapping to the fields of the CAN protocol. The frameinterpreting unit 120 transfers a series of values judged to be the IDfield in this interpreting to the reception ID determining unit 130.

The frame interpreting unit 120 further decides, in accordance withdetermination results notified from the reception ID determining unit130 whether to transfer the value of the ID field of the message and thedata field appearing following the ID field to the frame processing unit150, or to cancel reception of the message. In a case having judged thata message does not follow the CAN protocol, the frame interpreting unit120 requests the frame generating unit 180 to transmit an error frame.In a case of having judged that an error frame transmitted by anothernode has been received, the frame interpreting unit 120 discards themessage being read.

The reception ID determining unit 130 receives the value of the ID fieldfrom frame interpreting unit 120, and performs determination of whetheror not to receive the message that has been read out, following the listof message IDs that the reception ID list storing unit 140 stores. Thereception ID determining unit 130 notifies the frame interpreting unit120 of the results of this determination.

The reception ID list storing unit 140 stores a reception ID list thatis a list of message IDs that the ECU 100 receives. The reception IDlist is the same as that in FIG. 4, so description will be omitted here.

The frame processing unit 150 performs processing in accordance with thedata of the received message. The contents of processing differdepending on the ECU 100. For example, upon receiving a messageindicating that a door is open when the speed is exceeding 30 km, theECU 100 a executes processing to sound an alarm sound. Upon a dooropening when a message is being received indicating that the brakes arenot applied, the ECU 100 c executes processing to sound an alarm sound.These processing are listed here exemplarily for the sake ofdescription, and the ECUs 100 may execute processing other than thosedescribed above. The frame processing unit 150 causes the framegenerating unit 180 to generate frames to be sent out for executing suchprocessing.

The data obtaining unit 170 obtains output data indicating the state ofdevices and measurement values from sensors and so forth connected tothe ECUs 100, which is transferred to the frame generating unit 180.

The frame generating unit 180 configures an error frame in accordancewith a request for an error frame that has been notified from the frameinterpreting unit 120, and transmits to the frame transmission/receptionunit 110. The frame generating unit 180 also configures a message frameby attaching a message ID that has been decided beforehand to values ofdata received from the data obtaining unit 170, and transmits to theframe transmission/reception unit 110.

1.8 Unauthorized Activity Detection Processing

FIG. 10 is a flowchart illustrating an example of unauthorized activitydetection processing at the unauthorized activity detection processingfunction group 370.

First, the unauthorized activity detecting unit 371 receives a messageform the frame processing unit 350 (step S1001).

The unauthorized activity detecting unit 371 that has received themessage uses various types of determining functions, such as IDdetermining function and so forth, to determine whether that message isan attack message or a normal message. The unauthorized activitydetecting unit 371 notifies the message saving processing unit 372 ofthe results of the determining. At this time, the unauthorized activitydetecting unit 371 further commissions the communication patterndetermining unit 375 to determine whether or not the received messagematches a communication pattern of an attack message. The comprehensivedetermining function of the unauthorized activity detecting unit 371makes a final comprehensive determination regarding this message, basedon the results of determination by the various types of determiningfunctions such as ID determining function, and the results ofdetermination by the communication pattern determining unit 375 (stepS1002).

In a case of the message saving processing unit 372 having received anotification that the received message is an attack message, as thefinal determination results from the unauthorized activity detectingunit 371 (Yes in step S1003), the flow advances to step S1004. In a casewhere the notification that the message saving processing unit 372 hasreceived is a notification that the received message is not an attackmessage, the unauthorized activity detection processing at theunauthorized activity detection processing function group 370 ends (Noin step S1003).

In a case of Yes in step S1003, the message saving processing unit 372causes the attack message information storing unit 373 to saveinformation relating to the attack message (step S1004).

After information relating to the attack message has been saved in theattack message information storing unit 373, the communication patternidentifying unit 374 determines whether or not conditions for executingidentification of communication pattern have been satisfied (stepS1005). Determination of whether or not identification is necessary isexecuted based on whether or not the count of attack messages stored isof a level where communication patterns can be identified.

In a case where the communication pattern identifying unit 374determines in step S1005 that communication pattern identification isnecessary (Yes in step S1005), the communication pattern identifyingunit 374 identifies an attack pattern from information relating toattack messages stored in the attack message information storing unit373 (step S1006).

In a case of the communication pattern identifying unit 374 determiningin step S1005 that communication pattern identification is not necessary(No in step S1005), the unauthorized activity detection processing atthe unauthorized activity detection processing function group 370 ends.

The identified communication pattern is stored in the memory of thegateway 300, and is referenced by the communication pattern determiningunit 375 or communication pattern determining unit 375 a fordetermination of received messages. The results of this determinationare used in the comprehensive determining function in the unauthorizedactivity detection processing (step S1002). Accordingly, determinationof whether or not individual messages are attack messages is executedwith higher precision.

Note that out of the above-described unauthorized activity detectionprocessing at the unauthorized activity detection processing functiongroup 370, the step of unauthorized activity detection by theunauthorized activity detecting unit 371, and the step of communicationpattern matching determination at the communication pattern determiningunit 375 or communication pattern determining unit 375 a, are executedon each reception message, but other steps are executed in a case wherepredetermined conditions are satisfied in step S1003 or step S1005, andaccordingly are not necessarily executed on each reception message.

The unauthorized activity detecting unit 371 also has been described asexecuting final determination regarding whether or not the receivedmessage is an attack message, comprehensively from the determinationresults of the various types of determining functions such as IDdetermining function and so forth, and the determination results fromthe communication pattern determining unit 375, but this is notrestrictive. For example, determination may be temporarily made from thedetermination results of the various types of determining functions,determination be made by the communication pattern determining unit 375in accordance with the determination results thereof, and thereafterfinal determination be made. Conversely, determination by thecommunication pattern determining unit 375 may be made first, anddetermination by various types of determining function such as IDdetermining function be performed in accordance with the result thereof.

Also, the determination to be executed may be decided for each messagereceived. Accordingly, depending on the received messages, messagesregarding which determination by the various types of determiningfunctions such as ID determining function at the unauthorized activitydetecting unit 371 is sufficient, for example, can be kept fromdetermination by the communication pattern determining unit 375 beingperformed, regardless of the results. Messages which only needdetermination by the communication pattern determining unit 375 can bekept from determination being performed by the various determiningfunctions of the unauthorized activity detecting unit 371 regardless ofthe results thereof.

Accordingly, determination processing by the various types ofdetermining functions or by the communication pattern determining unit375 can be omitted in accordance with determination results of themessage that has been received, so advantages of higher speed andreduced electricity consumption can be expected for the determiningprocessing of the overall unauthorized activity detection processingfunction group 370.

1.9 Transfer Processing

FIG. 11 is a diagram illustrating a flowchart illustrating an example oftransfer processing that the gateway 300 performs. The content of thistransfer processing is substantially the same regardless of thedirection of transfer, so this transfer processing will be describedbelow by way of an example of a case of transferring a message that thegateway 300 has received from the bus 200 a to the bus 200 b.

First, the frame transmission/reception unit 310 reads out a messagefrom the bus 200 a (step S1101). The frame transmission/reception unit310 transfers the data of the fields of the message that has been readout to the frame interpreting unit 320.

Next, the frame interpreting unit 320 cooperates with the reception IDdetermining unit 330 to determine whether or not the message that hasbeen read out is a message that is the object of reception andprocessing, from the ID field value (message ID) thereof (step S1102).In a case where the frame interpreting unit 320 determines that this isnot a message that is the object of processing (No in step S1102), thismessage is not transferred.

In a case of having determined in step S1102 that the message is anobject of reception and processing (Yes in step S1102), the frameinterpreting unit 320 transfers the values of each of the fields withinthe message to the frame processing unit 350. Thereafter, the frameprocessing unit 350 decides the bus for the destination of transfer,following transfer rules stored in the transfer rule storing unit 360(step S1103).

The frame processing unit 350 notifies the unauthorized activitydetection processing function group 370 of the values of each of thefields in the message received from the frame interpreting unit 320, andrequests determination regarding whether an attack message or not.

The unauthorized activity detection processing function group 370determines whether or not the notified message is an attack message,from the values of each of the fields of the message notified thereto(step S1104), and notifies the frame processing unit 350 of the resultsof determination. In a case where the unauthorized activity detectionprocessing function group 370 has determined that this is an attackmessage (Yes in step S1104), transfer of this message is not performed.

In a case where determination is made in step S1104 that the message isnot an attack message but is a normal message (No in step S1104), theframe processing unit 350 requests the frame generating unit 380 totransfer that message to the transfer destination bus decided in stepS1103. Upon receiving the request from the frame processing unit 350,the frame generating unit 380 generates a message so that the specifiedtransfer destination will receive, and sends this message out to theframe transmission/reception unit 310 (step S1105).

Although determination of whether this message is an attack message ornot (step S1104) is performed after deciding the transfer destination ofthe received message (step S1103) in the above example, this is notrestrictive. The transfer destination of this message may be decidedafter determining whether the received message is an attack message ornot. Also, deciding of the transfer destination of the received messageand determination of whether an attack message or not may be performedin parallel.

1.10 Advantages

In the present embodiment, the unauthorized activity detectionprocessing function group 370 monitors messages flowing over the networkof the onboard network system, and determines whether or not thereceived messages match communication patterns, thereby determiningwhether or not an attack message. Communication patterns are patternsrelating to change in data values of messages or communication timings,indicating features of attack messages. Such communication patterns areidentified and obtained based on information relating to messages thathave already been determined to be attack messages. Accordingly, evenmessages regarding which determination of whether a normal message orattack message has been difficult from just information relating to onereception message for example, such as had been used in conventionalunauthorized activity detection, can be determined with high precision.As a result, the safety of the onboard network system can be improved.

Second Embodiment

2. Overview

An unauthorized activity detection processing function group that usesthe above-described communication patterns to decide a message used as areference (hereinafter also referred to as reference message) forcalculating information relating to a reception message that is theobject of unauthorized activity detection processing, i.e., forcalculation of data values or reception time of the received message,will be described as a second embodiment, with reference to thedrawings. Such an unauthorized activity detection processing functiongroup can be included in a gateway instated of the unauthorized activitydetection processing function group 370 in FIG. 3. The gateway havingthis unauthorized activity detection processing function group, and theonboard network system having this gateway, can basically be the same aswith the first embodiment, so description of the configuration thereofwill be omitted.

2.1 Configuration of Unauthorized Activity Detection Processing FunctionGroup

FIG. 12 is a block diagram illustrating the functional configuration ofan unauthorized activity detection processing function group 370 baccording to the present embodiment. In FIG. 12, components that are thesame as in FIG. 6 are denoted by the same symbols, and description willbe omitted. Part of components that are the same are omitted fromillustration. The unauthorized activity detection processing functiongroup 370 b will be described primarily with regard to points ofdifference from the unauthorized activity detection processing functiongroup 370.

In addition to the configuration of the unauthorized activity detectionprocessing function group 370 according to the first embodiment, theunauthorized activity detection processing function group 370 b includesa reference message deciding unit 377 b and reference message candidatestoring unit 378 b. The unauthorized activity detection processingfunction group 370 b includes an unauthorized activity detecting unit371 b instated of the unauthorized activity detecting unit 371, and acommunication pattern determining unit 375 b instead of thecommunication pattern determining unit 375. Note that these componentsalso are functional components, and are realized by reading out andexecuting of programs stored in the memory of the gateway by theprocessing unit, storing of predetermined data by the storing unit, andtransmission/reception of data via the input/output unit, andcombinations thereof.

The reference message deciding unit 377 b decides a reference messageused as a reference in calculation of difference in transmission timefrom one message back with the same ID by the transmission cycledetermining function of the unauthorized activity detecting unit 371 b,and calculation of the amount of change from one message back with thesame ID by the data value determining function.

For example, in a case where a margin of time length a before and aftera planned reception time T has been taken into consideration regarding amessage periodically transmitted, there are cases where multiplemessages are transmitted within that margin. At this time, the referencemessage deciding unit 377 b decides, out of the multiple messages, amessage to use as a reference message.

Upon recognizing from the received message that transmission has beenmade to the next reception cycle, the unauthorized activity detectingunit 371 b requests the reference message deciding unit 377 b to obtaina reference message.

The reference message deciding unit 377 b obtains information relatingto messages that are candidates for the reference message, from thereference message candidate storing unit 378 b, and decides a message touse as the reference message from the candidates, and notifies theunauthorized activity detecting unit 371 b. When deciding the referencemessage, the reference message deciding unit 377 b notifies thecommunication pattern determining unit 375 b of the candidates for thereference message. The communication pattern determining unit 375 bexecutes determination regarding whether or not the messages that arecandidates agree with one of the communication patterns, or thecloseness to the communication patterns.

The reference message deciding unit 377 b excludes messages determinedto agree with one of the communication patterns or to be close beyond acertain degree, from the results of determination by the communicationpattern determining unit 375 b. In a case where the number of remainingcandidate messages is one at this stage, the reference message decidingunit 377 b decides this message to be the reference message. In a casewhere multiple messages remain as candidates, the reference messagedeciding unit 377 b decides the reference message in accordance withrules decided beforehand.

The message that is closest in actual reception time to the plannedreception time T may be decided to be the reference message, forexample, in accordance with rules decided beforehand. Also, for example,the message that is a message transmitted at a time after the plannedreception time T and the actual reception time is closest to the plannedreception time T out of the candidate messages may be decided to be thereference message. Conversely, the message that is a message received ata time before the planned reception time T and the actual reception timeis closest to the planned reception time T may be decided to be thereference message. Further, as a separate example, whether to select amessage of a time after the planned reception time T or to select amessage at a time earlier, may be switched in accordance with whetherthe message transmitted one back or two back was later or earlier thanthe planned reception time T. Also, whether to select a message of whichthe actual reception time is closer to the planned reception time T orto select a message that is farther may be switched, in accordance withwhether or not the message was transmitted consecutively.

The rules decided beforehand may be rules where the reference message isdecided using a data value. For example, a message that is close to adata value of another message representing data amount of the same type,and having the same ID or a particular different ID, may be decided asbeing the reference message, or a message including a data value closeto a value calculated from the data value of another messagerepresenting data amount of the same type may be decided as being thereference message. In a case where the amount of change of data can bepredicted, a message of a data value close in comparison to a predictedvalue thereof may be decided to be the reference message.

The reference message candidate storing unit 378 b stores referencemessage candidates to be presented to the reference message decidingunit 377 b. The unauthorized activity detecting unit 371 b notifies thereference message candidate storing unit 378 b of information relatingto messages to be candidates of the reference message, from receivedmessages. The reference message candidate storing unit 378 b storesinformation relating to messages that are candidates of the referencemessage, notified from the unauthorized activity detecting unit 371 b,and notifies the reference message deciding unit 377 b of informationrelating to messages that are candidates for the reference message, inaccordance with the request from the reference message deciding unit 377b.

Note that while an arrangement has been described above where, uponrecognizing that transmission has been made to the next reception cyclefrom received messages, the unauthorized activity detecting unit 371 bcommissions the reference message deciding unit 377 b to obtain thereference message, this is not restrictive. For example, an arrangementmay be made where when the first message is received within the marginof the planned reception time T, information relating to the receivedmessage is stored in the reference message candidate storing unit 378 bas a reference message candidate, and thereafter, each time a message isreceived within the margin of the planned reception time T, thereference message deciding unit 377 b is requested to decide thereference message.

In this case, the reference message deciding unit 377 b takes thenewly-received message as a reference message candidate, and decideswhich of this and the reference message candidate that the referencemessage candidate storing unit 378 b stores to keep as a referencemessage candidate. This decision is made following rules used to decidethe reference message described above. The reference message candidatethat remains as a result of this decision continues to be stored at thereference message candidate storing unit 378 b. Thereafter, thereference message candidate remaining at the point of transitioning tothe next reception cycle becomes the reference message used next.Accordingly, only one message needs to be always stored as a referencemessage candidate, so resources for storing candidates can be conserved.

Now, an arrangement has been described where when deciding a referencemessage from the reference message candidates, the reference messagedeciding unit 377 b excludes several candidates from the candidatemessages, based on the results of determination by the communicationpattern determining unit 375 b, and decides the reference message fromthe remaining candidate messages following rules decided beforehand, butthis is not restrictive. For example, the reference message decidingunit 377 b may first narrow down the candidates following rules decidedbeforehand, and thereafter request the communication pattern determiningunit 375 b for communication pattern determination, and decide thereference message in accordance with the determination results. Also, ina case where determination is made at the communication patterndetermining unit 375 b that all candidate messages agree with some sortof communication pattern, or in a case where determination is made thatnone of the candidate messages can become a reference message as theresult of determination by rules decided beforehand, i.e., in a casewhere all candidate messages have been determined to be inappropriate asa reference message, the reference message deciding unit 377 b maydecide there to be no reference message. Alternatively, a rule to beused in a case where determination is made that all of the candidatemessages are inappropriate as a reference message may be definedseparately, with the reference message deciding unit 377 b deciding areference message following this rule.

The rule defined separately may be a rule with a dedicated definition.For example, this may be a rule for deciding a reference message thathas been decided beforehand, or a rule where the appropriateness of areference message is scored when determining communication patterns,with the reference message being decided based on that score.

Also, a rule may be defined where, in a case of the communicationpattern determining unit 375 b determining that all candidate messagesagree with some sort of communication pattern, rules decided beforehandare applied to all candidate messages again, and a reference message isdecided. Conversely, a rule may be defined where, in a case wheredetermination is made that none of the candidate messages can be areference message as the result of judgement by a rule decidedbeforehand, the communication pattern determining unit 375 b is inquiredagain regarding all the reference messages, and the reference message isdecided in accordance with the results thereof.

Also, a configuration may be made where information relating to attackmessages is modeled and that model is used as a communication patternfor determination of matching with communication patterns, in the sameway as the configuration illustrated in FIG. 8 according to the firstembodiment. FIG. 13 is a diagram illustrating an example of theconfiguration of an unauthorized activity detection processing functiongroup 370 c according to the present embodiment, that determines a modelobtained by modeling information relating to attack messages as acommunication pattern, in determination of matching with communicationpatterns. The unauthorized activity detection processing function group370 c may replace the unauthorized activity detection processingfunction group 370 b and be included in the gateway 300 according to thefirst embodiment.

The communication pattern determining unit 375 c has the same functionsas the communication pattern determining unit 375 b, and further has afunction of determining communication patterns using prediction valuesby a communication pattern predicting unit 376 c.

The communication pattern predicting unit 376 c has the same functionsas the communication pattern predicting unit 376 a, and has a functionof notifying prediction values in response to requests from acommunication pattern determining unit 375 c. This prediction value iscalculated by the communication pattern predicting unit 376 c using amodel identified by a communication pattern identifying unit 374 c as acommunication pattern.

The communication pattern identifying unit 374 c has the same functionas the communication pattern identifying unit 374 a.

These components of the unauthorized activity detection processingfunction group 370 c also are function components, and are realized byreading out and executing of programs stored in the memory of thegateway by the processing unit, storing of predetermined data by thestoring unit, and transmission/reception of data via the input/outputunit, and combinations thereof.

2.2 Unauthorized Activity Detection Processing

FIG. 14 is a flowchart illustrating an example of unauthorized activitydetection processing at the unauthorized activity detection processingfunction group 370 b. Steps that are the same as in FIG. 10 are denotedwith the same symbols in FIG. 14, and part of the description will beomitted.

First, the unauthorized activity detecting unit 371 b receives a messagefrom the frame processing unit 350 (step S1001).

The unauthorized activity detecting unit 371 b that has received themessage determines whether the reception cycle of a message transmittedperiodically has transitioned to the next cycle (step S1402).

In a case of the unauthorized activity detecting unit 371 b havingdetermined in step S1402 that transitioning to the next reception cyclehas occurred, a new reference message is decided (step S1403).

After having decided the new reference message in step S1403, or in acase of having determined in step S1402 that the reception cycle has nottransitioned to the next, unauthorized activity detection processing isperformed (step S1404).

The unauthorized activity detecting unit 371 b uses various types ofdetermining function such as the ID determining function and so forth,to determine whether the received message is an attack message or anormal message. The various types of determination functions of theunauthorized activity detecting unit 371 b perform determination usingthe reference message decided in step S1403, as necessary. Theunauthorized activity detecting unit 371 b then notifies the results ofthe determination to the message saving processing unit 372.

Other processing in step S1404 is the same as the unauthorized activitydetection processing in step S1002 in FIG. 10. Processing of step S1003and thereafter is the same as in FIG. 10, so description will beomitted.

2.3 Advantages

In the unauthorized activity detection processing at the unauthorizedactivity detection processing function group 370 b in the presentembodiment, when deciding a reference message that the various types ofdetermining functions of the unauthorized activity detecting unit 371 buses is decided, whether or not candidate messages match communicationpatterns is determined, and the reference message is decided fromcandidate messages that do not match communication patterns.Accordingly, a situation that conventionally could occur, where anattack message is used as a reference message, and as a result,unauthorized activity detection could not be correctly performed can besuppressed, and whether an attack message or not can be determined withhigher precision. As a result, the safety of the onboard network systemcan be improved.

Third Embodiment

3. Overview

An onboard network system where part of the functions of theunauthorized activity detection processing function group is situated ina server outside of the vehicle, and the gateway and server communicate,will be described as a third embodiment with reference to the drawings.

3.1 Overall Configuration of Onboard Network System

FIG. 15 is a block diagram illustrating the overall configuration of anonboard network system 10 a according to the present embodiment. Thecomponents in FIG. 15 that are the same as in the onboard network system10 illustrated in FIG. 1 are denoted with the same symbols, anddescription will be omitted.

The onboard network system 10 a is configured of a CAN network, andincludes ECUs 100 (ECU 100 a, ECU 100 b, ECU 100 c, and ECU 100 d in thedrawings, also collectively or an unspecified part thereof beingreferred to as ECU 100 hereinafter), the bus 200 (bus 200 a and 200 b inthe drawings, also collectively or an unspecified one thereof beingreferred to as bus 200 hereinafter), a gateway 300 d, an externalnetwork 400 and a server 500.

The gateway 300 d is connected to the bus 200 a to which the ECU 100 aand ECU 100 b are connected, and to the bus 200 b to which the ECU 100 cand ECU 100 d are connected. The gateway 300 d has a function oftransferring a message received from one bus to the other bus. Thegateway 300 d also is a node on the CAN network.

The external network 400 is a communication network for connecting thegateway 300 and the server 500. The communication method of the externalnetwork 400 may be wired or wireless. The wireless communication methodmay be Wi-Fi, 3G, or LTE, for example, which are existing technologies.

The server 500 performs communication with the gateway 300 d via theexternal network 400. The gateway 300 d and the server 500 each sharepart of the functions of the unauthorized activity detection processingfunction group 370 in the first embodiment, and perform theabove-described unauthorized activity detection processing by thegateway 300 d and server 500 operating cooperatively.

3.2 Configuration of Gateway

FIG. 16 is a block diagram illustrating an example of the functionalconfiguration of the gateway 300 d. Components in FIG. 16 that are thesame as in FIG. 3 are denoted by the same symbols, and description willbe omitted. Description will be made below regarding the gateway 300 d,primarily with regard to points of difference from the gateway 300.

The gateway 300 d differs with regard to the points that it has anunauthorized activity detection processing function group 370 d insteadof the unauthorized activity detection processing function group 370 inthe configuration of the gateway 300, and further has an externalcommunication unit 390. These components also are function components,and are realized by reading out and executing of programs stored in thememory of the gateway 300 d by the processing unit, storing ofpredetermined data by the storing unit, and transmission/reception ofdata via the input/output unit, and combinations thereof.

The unauthorized activity detection processing function group 370 dcommunicates with the server 500 and executes determination of whether areceived message is an attack message or not in cooperation therewith.Details of the configuration included in the unauthorized activitydetection processing function group 370 d will be described later. Theexternal communication unit 390 performs communication with the server500.

3.3 Configuration of Unauthorized Activity Detection Processing FunctionGroup

FIG. 17 is a block diagram illustrating an example of the functionalconfiguration of the unauthorized activity detection processing functiongroup 370 d. Components in FIG. 17 that are the same as in FIG. 6 aredenoted by the same symbols, and description will be omitted.

The unauthorized activity detection processing function group 370 dincludes the unauthorized activity detecting unit 371, a message savingprocessing unit 372 d, and a communication pattern determining unit 375d.

In a case of determining that the received message is an attack messageand saving is necessary, upon receiving the determination results fromthe unauthorized activity detecting unit 371, the message savingprocessing unit 372 d communicates with the server 500 via the externalcommunication unit 390, and transmits information relating to the attackmessage to the server 500 so as to be saved. Saving of a normal message,and determination of whether there is need to save a message or not, arethe same as in the first embodiment.

The communication pattern determining unit 375 d determines whether ornot the received message matches a communication pattern, in response toa determination request from the unauthorized activity detecting unit371. The communication pattern determining unit 375 d performs thisdetermination by communicating with the server 500 via the externalcommunication unit 390, receiving results of identification ofcommunication patterns performed at the server 500, and using thereceived results.

Note that in the identification of communication patterns at the server500, statistical processing or probability theory may be used to obtaina model of information relating to an attack message, and use the modelas a communication pattern, as with the communication patternidentifying unit 374 a. In this case, the gateway 300 d may have anunauthorized activity detection processing function group 370 e furtherincluding a communication pattern predicting unit 376 e, as illustratedin FIG. 18, instated of the unauthorized activity detection processingfunction group 370 d. FIG. 18 is a block diagram illustrating anotherexample of the functional configuration of the unauthorized activitydetection processing function group according to the present embodiment.

The communication pattern predicting unit 376 e receives a modelidentified by the server 500 via the external communication unit 390,and calculates a prediction value using this model as a communicationpattern, as with the communication pattern predicting unit 376 a. Acommunication pattern determining unit 375 e may determine whether ornot agreeing with a communication pattern, from this prediction valueand information relating to the received message.

3.4 Configuration of Server

FIG. 19 is a block diagram illustrating an example of the functionalconfiguration of the server 500. The server 500 has an attack messageinformation storing unit 373 d and a communication pattern identifyingunit 374 d. Note that these components are functional components, andthat the server 500 is a so-called server computer that is realized byone or more computers having an information processing device such as aprocessor, a storage device of semiconductor memory or the like, andinput/output unit including an input/output port, and so forth. Thefunctional components listed above are realized by reading out andexecuting of programs stored in the memory by the processing unit,storing of predetermined data by the storing unit, andtransmission/reception of data via the input/output unit, andcombinations thereof.

The attack message information storing unit 373 d stores informationrelating to attack messages regarding which saving has been instructedfrom the message saving processing unit 372 d of the gateway 300 d.Stored information relating to attack messages is output in response torequests from the communication pattern identifying unit 374 d.

The communication pattern identifying unit 374 d obtains informationrelating to attack messages from the attack message information storingunit 373 d, and identifies communication patterns seen in receivedattack messages. The specific identification method is the same as withthe communication pattern identifying units in the above-describedembodiments, so description will be omitted.

The communication pattern identifying unit 374 d transmits identifiedcommunication patterns in accordance with requests from thecommunication pattern determining unit 375 d or communication patternpredicting unit 376 e of the gateway 300 d.

Note that the server 500 may communicate with multiple vehicles, andshare part of the functions of the unauthorized activity detectionprocessing function group with the vehicles. In this case, the server500 may have an individual attack message information storing unit 373 dand communication pattern identifying unit 374 d regarding each vehicle,or may have one set of attack message information storing unit 373 d andcommunication pattern identifying unit 374 d for multiple vehicles withwhich communication is performed. The server 500 may have one set ofattack message information storing unit 373 d and communication patternidentifying unit 374 d for part of the vehicles with which communicationis performed. In a case of having one set as to multiple vehicles, theattack message information storing unit 373 d stores informationrelating to attack messages obtained from the vehicles along withinformation identifying the vehicles.

The communication pattern identifying unit 374 d may also identifycommunication patterns from information received from the vehicles in anindividual manner, and transmit individual identification results to thevehicles, or identify communication patterns using integratedinformation from the vehicles and transmit the identification resultsthereof to the vehicles.

The method of integrating information from the vehicles may be tointegrate information from all vehicles, for example, or to integrate byautomaker or vehicle type of the vehicles, and further by model andgrade. Integration may be performed by vehicle class (size, enginedisplacement, etc.) of the vehicles, by location of the vehicles, or byfunctions of the vehicles (automatic driving function, drivingassistance function, communication function, etc.). Integration may alsobe performed according to the type of firmware or software run on theECUs or the like of the vehicles, and further according to the versionsthereof. A combination of such integration methods may be used.

3.5 Advantages

In the present embodiment, the gateway 300 and the server 500 outside ofthe vehicle communicate, and the server 500 bears part of the functionsof the unauthorized activity detection processing function group 370 dor unauthorized activity detection processing function group 370 e.

Conventionally, communication patterns were identified only frominformation collected at individual vehicles, so communication patternsthat could be determined were limited. However, saving information inthe server 500 in the present embodiment enables communication patternsto be identified from information from multiple vehicles. Accordingly,communication patterns can be speedily or more precisely identifiedbased on a greater number of attack messages. Using these communicationpatterns at the vehicles enables identification of whether an attackmessage or not to be determined with higher precision. As a result,safety of the onboard network system can be improved. Also, there is noneed to have a large-capacity information storing device in the gateway300 since information relating to attack messages is stored at theserver 500, so manufacturing and maintaining costs of the vehicles canbe suppressed.

4. Modifications

It is needless to state that the present disclosure is not restricted tothe above-described embodiments, and arrangements where various types ofmodifications conceivable by one skilled in the art are made to theembodiments, and arrangements configured by combining components indifferent embodiments, are also included in the scope of the presentdisclosure, unless departing from the essence of the present disclosure.The following modifications, for example, are also included in thepresent disclosure.

(1) The unauthorized activity detection processing function group 370 chas been described in the above embodiments as including theunauthorized activity detecting unit 371, message saving processing unit372, attack message information storing unit 373, communication patternidentifying unit 374 c, communication pattern determining unit 375 c,communication pattern predicting unit 376 c, reference message decidingunit 377 b, and reference message candidate storing unit 378 b, but thisis not restrictive.

As illustrated in FIG. 20, this may be provided with the unauthorizedactivity detecting unit 371, a message saving processing unit 372 f, anattack message information storing unit 373 f, a communication patternidentifying unit 374 f, a communication pattern determining unit 375 f,the communication pattern predicting unit 376 c, the reference messagedeciding unit 377 b, the reference message candidate storing unit 378 b,and a vehicle state recognizing unit 379 f. Also, the unauthorizedactivity detection processing function group in other embodiments (370,370 a, 370 b, 370 d, 370 e) may further have the vehicle staterecognizing unit 379 f (omitted from illustration).

Now, the vehicle state recognizing unit 379 f recognizes what sort ofstate the vehicle is in, from the contents of CAN messages, the state ofvarious types of switches, and so forth. An example of the state thatthe vehicle state recognizing unit 379 f recognizes is a state relatingto automatic driving of the vehicle. More specific examples includewhether the vehicle is currently in a “normal traveling mode” where thevehicle is traveling with a driver performing most all of drivingactions (recognition, judgment, and operating), a “driving assistancemode” where the vehicle is supplementing and assisting part of drivingactions, an “automatic driving mode” where the driver performs nodriving actions and the vehicle is driving automatically, and so forth.This may also be one of states of the vehicle “traveling”, “stopped”,and “parked (engine off)”. Of these states, multiple states that can beconcurrent may be recognized. Alternatively, this may be a state of oneor more of various types of functions to realize automatic driving(hereinafter also referred to as automatic driving functions) beingvalid or invalid.

For example, the message saving processing unit 372 f may, in additionto information relating to attack messages, store together informationindicating state, which the vehicle state recognizing unit 379 frecognizes and outputs at that time. The message saving processing unit372 f may save information relating to attack messages only when havingreceived information indicating a particular state. Also, thecommunication pattern identifying unit 374 f and communication patterndetermining unit 375 f may each operate in accordance with predetermineddifferent states indicated by information output by the vehicle staterecognizing unit 379 f.

As a specific example, the communication pattern identifying unit 374 fidentifies communication patterns during the “normal traveling mode” orat a timing of switching from “normal traveling mode” to “drivingassistance mode” or “automatic driving mode”. On the other hand, thecommunication pattern determining unit 375 f determines communicationpatterns when in “driving assistance mode” or “automatic driving mode”.As for another example, the communication pattern identifying unit 374 fidentifies communication patterns while being “stopped” or “parked”, andthe communication pattern determining unit 375 f determinescommunication patterns when “traveling”.

Accordingly, when the vehicle is in a state where attacks can be easilydetermined, information relating to attack messages is collected andsaved, and identification of communication patterns is executed, anddetermination using communication patterns can be performed when thevehicle is in a state where determination of attacks is difficult. Morespecifically, when the automatic driving function is not being executedat the vehicle, there is unnecessary output information from sensorsconnected to ECUs, and control signals from ECUs to actuators and thelike also are unnecessary. Accordingly, there is less communicationamong the nodes as compared to when the automatic driving function isbeing executed, and attack messages do not readily blend in with othermessages, so the precision of determination of attacks tends to behigher. As a result, further improvement in unauthorized activitydetection precision and reduction in processing costs can be realized.

(2) The unauthorized activity detection processing function group 370has been described as having the unauthorized activity detecting unit371, message saving processing unit 372, attack message informationstoring unit 373, communication pattern identifying unit 374, andcommunication pattern determining unit 375, but this is not restrictive.The unauthorized activity detection processing function group may beconfigured of fewer components. For example, an unauthorized activitydetection processing function group 370 g may be made that has anunauthorized activity detecting unit 371 g and a communication patterndetermining unit 375 g, as illustrated in FIG. 21.

Also, the unauthorized activity detection processing function group 370b has been described as having the unauthorized activity detecting unit371, message saving processing unit 372, attack message informationstoring unit 373, communication pattern identifying unit 374,communication pattern determining unit 375, reference message decidingunit 377 b, and reference message candidate storing unit 378 b, but thisis not restrictive. For example, an unauthorized activity detectionprocessing function group 370 h may be made with fewer components, whichas an unauthorized activity detecting unit 371 h, a communicationpattern determining unit 375 h, and the reference message deciding unit377 b and reference message candidate storing unit 378 b, as illustratedin FIG. 22.

In the above, the communication pattern determining unit 375 g andcommunication pattern determining unit 375 h store information relatingto communication patterns beforehand, and determine whether matching acommunication pattern or not using that information. This does away withthe need to store attack message information, and the cost of an attackmessage information storing device to store attack messages can beconserved.

(3) Although the unauthorized activity detection processing functiongroup 370 has been described as having the unauthorized activitydetecting unit 371, message saving processing unit 372, attack messageinformation storing unit 373, communication pattern identifying unit374, and communication pattern determining unit 375, this is notrestrictive. As illustrated in FIG. 23, an unauthorized activitydetection processing function group 370 i may be made that includes anunauthorized activity detecting unit 371 i, the communication patterndetermining unit 375 g, and the vehicle state recognizing unit 379 f. Inthis case, the unauthorized activity detecting unit 371 i decideswhether to use the determination results of the communication patterndetermining unit 375 g in unauthorized activity detection processing, inaccordance with the state of the vehicle that the vehicle staterecognizing unit 379 f has recognized.

Accordingly, determination processing by the communication patterndetermining unit 375 g can be performed at an appropriate timing, anddetermination processing at unnecessary timings, for example, can beomitted.

(4) The ECUs 100 in the above embodiments have been described has havingthe frame transmission/reception unit 110, frame interpreting unit 120,reception ID determining unit 130, reception ID list storing unit 140,frame processing unit 150, data obtaining unit 170, and frame generatingunit 180, but the configuration of ECUs that the onboard network systemaccording to the present disclosure has is not restricted to this.

For example, the ECUs that the onboard network system has may furtherhave the unauthorized activity detection processing function group 370,as with an ECU 100 e illustrated in FIG. 24. In this case, determinationof whether or not an attack message may be requested to the unauthorizedactivity detection processing function group 370 by the frame processingunit 150, or may be requested by the frame interpreting unit 120.

The ECUs that the onboard network system has may be configured includingthe frame transmission/reception unit 110, frame interpreting unit 120,frame generating unit 180, and unauthorized activity detectionprocessing function group 370, as with an ECU 100 f illustrated in FIG.25. In this case, the frame interpreting unit 120 may receive allmessages regardless of ID, for example, and commission the unauthorizedactivity detection processing function group 370 to determine whether anattack message or not for all messages.

Also, the ECUs 100 may have, in addition to the configuration in FIG.25, the reception ID determining unit 130 and reception ID list storingunit 140, only receiving messages having message IDs listed in thereception ID list that the reception ID list storing unit has andcommissioning the unauthorized activity detection processing functiongroup 370 to determine whether an attack message or not with regard tothese messages. Note that the unauthorized activity detection processingfunction group 370 may be replaced with any of the above-described 370 athrough 370 i.

Accordingly, not only the gateway but also ECUs can determine whether ornot messages transmitted to the bus are attack messages. As a result,redundancy of the system for unauthorized communication detection in theonboard network system is improved, for example, thereby securing safetyat a higher level.

Further, the ECUs that the onboard network system has may include atransmission data obtaining unit 171 that obtains data for transmissionto the bus 200 from other connected devices or externally, or the like,as with an ECU 100 g illustrated in FIG. 26. An unauthorized activitydetection processing function group 370 j that the ECU 100 g has maydetermine whether data received from the transmission data obtainingunit 171 is an attack message or not, and commission the framegenerating unit 180 to transmit a message only in a case wheredetermination is made that it is not an attack message. Note that theconfiguration of the unauthorized activity detection processing functiongroup 370 j may be the same as any of unauthorized activity detectionprocessing function groups 370 and 370 a through 370 i.

Accordingly, in a case where an ECU used along with an automotivenavigation system is receiving transmission of attack messages from theautomotive navigation system that has been taken over, for example,proliferation of the messages to the network can be suppressed. Also,intrusion into the onboard network system by attack messages which arebeing attempted to be sent in from outside of the vehicle can besuppressed.

(5) Although an example of not transferring a received message has beenillustrated in the above-described embodiments as an action inaccordance with detection of unauthorized activity, this is notrestrictive. For example, a gateway or ECU having the unauthorizedactivity detection processing function group described above may performunauthorized activity detection processing while receiving messages, andat a point of determining that it is an attack message, transmit anerror frame, thereby invalidating the message being received from thenetwork. Accordingly, other ECUs connected to the bus where the attackmessage was discovered can be prevented from receiving the attackmessage. The same action can also be applied to messages that are nottransferred.

Also, a gateway or ECU having the unauthorized activity detectionprocessing function group described above may further performnotification of unauthorized activity to the user or to an externalserver or the like, recording of a log of occurrence of unauthorizedactivity, or transitioning the vehicle to a fail-safe mode.

Accordingly, flexible measures can be made following detection ofunauthorized activity. Also, multiple messages that have been determinedto be attack messages can be handled as one or more systems of data, andlearning may be performed for each system with sets of data values orreception intervals as unauthorized activity labels.

(6) Although description has been made in the embodiment above that themessage saving processing unit 372 saves information relating to anattack message in a case where the received message is an attack messageand saving has been determined to be necessary, this is not restrictive.For example, the message saving processing unit 372 may save informationrelating to messages that could not be determined to be either an attackmessage or a normal message when receiving the messages, as graymessages.

Messages stored as gray messages are subjected to determination ofwhether a normal message or an attack message again, and a predeterminedtiming. Also, communication patterns may be identified from messagesnewly determined to be attack messages as a result thereof, andinformation that had been saved as gray messages may be saved again asinformation relating to attack messages, to be used along with otherinformation relating to attack messages for identification ofcommunication patterns

The timing for determining gray messages may be when a count decidedbeforehand of information relating to attack messages, such as tenmessages for example, have been saved, or by each time decidedbeforehand such as one minute, or when the state of the vehicledetermined by the vehicle state recognizing unit 379 f has beenswitched.

Also, the method of determining whether a gray message is a normalmessage or an attack message may be to perform determination for eachmessage by the unauthorized activity detecting unit 371 again, or toview multiple gray messages as one or more systems of data, anddetermine whether the system is a system of normal messages or a systemof attack messages. For example, gray messages of which data valuessimply fall within a certain range may be taken as one system to dividethe gray messages into multiple systems, and determination may be maderegarding each system whether a system or normal messages or a system ofattack messages. Also, the gray messages may be divided into multiplesystems by determining gray messages in time-sequence where the amountof change in data value is a certain magnitude or greater to be data ofa different system, and determination may be made regarding each systemwhether a system or normal messages or a system of attack messages.Also, dividing into systems may be performed using a clusteringtechnique in the field of machine learning, and determine whether thesystem is a system of normal messages or a system of attack messages.

As for a method to determine whether a system of normal messages or asystem of attack messages, a statistical amount such as variance indifference between the reception times of a normal message and a messageone before may be calculated beforehand, for example, and determinationbe made whether a system of normal messages or a system of attackmessages based on which system is closer to the statistical amountcalculated beforehand. A system of attack messages may be found bycalculation of degree of abnormality through density ratio estimation inreception time differences in a system of normal messages and receptiontime differences in a system of messages for evaluation.

The timing of identifying communication patterns may be immediatelyafter re-saving gray messages as attack messages, or may be anothertiming.

(7) Although an example has been described in the above embodimentswhere the ID is a standard format, but the ID may be an extended format.

(8) Although an example has been described in the above embodimentswhere messages are transmitted in plaintext, they may be encrypted.Messages may include message authentication code.

(9) Although an example has been described in the above embodimentswhere data is stored in plaintext, data may be encrypted and stored.

(10) An onboard network system has been illustrated in the aboveembodiments as an example of a network system that communicatesfollowing the CAN protocol. The technology related to the presentdisclosure is not restricted to use in an onboard network, and may beused in network communication systems that communicate following the CANprotocol other than onboard networks, such as networks of robots,industrial equipment, and so forth.

The CAN protocol has been used as the onboard network in theabove-described embodiments, but this is not restrictive. For example,CAN with Flexible Data Rate (CAN-FD), FlexRay, Ethernet, LocalInterconnect Network (LIN), Media Oriented Systems Transport (MOST), andso forth, may be used. Further, sub-networks using these networks may becombined for the network.

(11) The devices in the above embodiments each specifically are computersystems configured of a microprocessor, read only memory (ROM), randomaccess memory (RAM), hard disk unit, display unit, keyboard, mouse, andso forth. A computer program is recorded in the RAM or hard disk unit.The devices achieve their functions by the microprocessor operating inaccordance with the computer program. Now, a computer program isconfigured by multiple sets of command codes instructing the computerbeing combined to achieve predetermined functions.

(12) Part or all of the components configuring the devices in theabove-described embodiment may be configured as a single system largescale integration (LSI). A system LSI is a super-multi-functional LSImanufactured integrating multiple components on a single chip, andspecifically is a computer system configured including a microprocessor,ROM, RAM, and so forth. A computer program is recorded in the RAM. Thesystem LSI realizes its functions by the microprocessor operatingaccording to the computer program.

The parts of the components making up the above devices may beindividually formed into one chip, or part or all may be included in onechip.

Also, while description has been made regarding a system LSI, there aredifferent names such as IC, LSI, super LSI, and ultra LSI, depending onthe degree of integration. The circuit integration technique is notrestricted to LSIs, and dedicated circuits or general-purpose processorsmay be used to realize the same. A field programmable gate array (FPGA)which can be programmed after manufacturing the LSI, or a reconfigurableprocessor where circuit cell connections and settings within the LSI canbe reconfigured, may be used.

Further, in the event of the advent of an integrated circuit technologywhich would replace LSIs by advance of semiconductor technology or aseparate technology derived therefrom, such a technology may be used forintegration of the functional blocks, as a matter of course. Applicationof biotechnology and so forth is a possibility.

(13) Part or all of the components of which the above-described devicesare configured may be configured as an integrated circuit (IC) carddetachably mountable to each device or a standalone module. The IC cardor module is a computer system configured including a microprocessor,ROM, RAM, and so forth. The IC card or module may include theabove-described super-multifunctional LSI. The IC card or moduleachieves its functions by the microprocessor operating according to thecomputer program. The IC card or module may be tamper-resistant.

(14) The present disclosure maybe the method described above. Thepresent disclosure also may be a computer program which realizes thesemethods by a computer, or may be digital signals made up of the computerprogram.

The present disclosure also may be the computer program or the digitalsignals recorded in a computer-readable recording medium, such as forexample, a flexible disk, a hard disk, a CD-ROM, MO, DVD, DVD-ROM,DVD-RAM, BD (Blu-ray (registered trademark) Disc), semiconductor memory,or the like. The present disclosure may also be the digital signalsrecorded in these recording mediums.

The present disclosure may also be an arrangement where the computerprogram or the digital signals are transmitted over an electriccommunication line, wireless or cable communication line, a network ofwhich the Internet is representative, data broadcasting, or the like.

Also, the present disclosure may be a computer system having amicroprocessor and memory, where the memory records the computerprogram, and the microprocessor operates according to the computerprogram.

The program or the digital signals may be recorded in the recordingmedium and transported, or the program or the digital signals may betransported over the network or the like, and thereby be executed byanother computer system that is independent.

(15) Combinations of the above embodiment and the above modificationsmay be made.

Technology for detection of unauthorized communication that aims toperform unauthorized control through unauthorized messages, in onboardnetworks according to one or multiple forms, has been described based onembodiments and modifications thereof. According to these embodimentsand modifications thereof, detection of unauthorized communication isperformed by a gateway or ECUs connected to an onboard network systemand performing communication, or by a combination of these and a servercomputer. A system, including one or more processors and a memory, thatexecutes such unauthorized communication detection, is referred to as anunauthorized communication detection system in the present disclosure.Accordingly, an unauthorized communication detection system includesarrangement realized by one device such as one gateway connected to anonboard network system, a combination of such a gateway and an ECU, andan arrangement realized by multiple devices, such as a combination witha server computer that is at a remote location from a gateway or ECU.

Also, this technology may be realized as a method including part or allof the steps of processing executed by the components in theabove-described embodiments and modifications thereof, or as a programexecuted by a processor of an unauthorized communication detectionsystem so that the unauthorized communication detection system carriesout this method.

Processing that particular components execute in the above-describedembodiments and modifications thereof may be executed by othercomponents instead of the particular components. Also, the order ofmultiple processing may be changed, and multiple processing may beexecuted in parallel.

The unauthorized communication detection method according to the presentdisclosure detects unauthorized activity by identifying communicationpatterns of attack messages, and determining whether or not a receivedmessage matches a communication pattern. Accordingly, normal messagescan be identified with precision even for messages regarding whichdistinguishing between normal messages and attack messages has beenconventionally difficult, enabling protection of the onboard network.

What is claimed is:
 1. An unauthorized communication detection method inan onboard network system that is executed by an information processingsystem including at least one memory, the onboard network systemincluding a network and one or more electronic control units connectedto the network, the unauthorized communication detection methodcomprising: receiving, over the network, messages transmitted to theonboard network system; determining, in a first determination, whether aplurality of the received messages is unauthorized; storing, in the atleast one memory: information relating to the plurality of the receivedmessages previously determined as unauthorized in the firstdetermination, and a communication pattern identified based on theinformation relating to the plurality of the received messagespreviously determined as unauthorized; executing unauthorized activitydetection of determining whether or not one of the messages receivedfrom the network is unauthorized; executing communication patterndetermination of determining whether or not the one of the messagesmatches the communication pattern; saving information relating to themessage in the at least one memory in a case where the one of themessages is unauthorized in the executing unauthorized activitydetection; updating the communication pattern based on informationrelating to the one of the messages and the information relating to theplurality of the received messages previously determined asunauthorized; and recognizing whether or not an automatic drivingfunction that a vehicle in which the onboard network system is installedhas, for assisting or substituting at least part of driving actions ofthe vehicle by the driver, is being executed, wherein a second, finaldetermination as to whether or not the message is unauthorized isperformed based on both a result of the executing unauthorized activitydetection and the executing communication pattern determination, whereinthe saving is executed when recognition is made in the recognizing thatthe automatic driving function is not being executed, and wherein theexecuting communication pattern determination is executed whenrecognition is made in the recognizing that the automatic drivingfunction is being executed.
 2. The unauthorized communication detectionmethod according to claim 1, wherein, a pattern relating to change in adata value included in the plurality of messages determined asunauthorized is identified as the communication pattern.
 3. Theunauthorized communication detection method according to claim 2,wherein the pattern relating to change in the data value is a patternrelating to whether or not there is change in the data value included inthe plurality of messages determined as unauthorized representing a dataamount of the same type included in the partiality plurality of messagesdetermined as unauthorized, a pattern relating to amount of increase ordecrease of a data amount included in the plurality of messagesdetermined as unauthorized representing the data amount of the sametype, or a pattern relating to difference or ratio between data valuesincluded in the plurality of messages determined as unauthorizedrepresenting the data amount of the same type and data values includedin the plurality of messages determined as unauthorized representing adata amount of another type.
 4. The unauthorized communication detectionmethod according to claim 1, wherein the communication pattern is apattern relating to communication timing of the plurality of thereceived messages previously determined as unauthorized.
 5. Theunauthorized communication detection method according to claim 4,wherein the pattern relating to communication timing of the plurality ofthe received messages previously determined as unauthorized is a patternrelating to intervals of transmission time of the plurality of thereceived messages previously determined as unauthorized representing adata amount of the same type included in the plurality of the receivedmessages previously determined as unauthorized, or a pattern relating toa difference in transmission times among a plurality of the receivedmessages previously determined as unauthorized representing the dataamount of the same type or between the plurality of the receivedmessages previously determined as unauthorized representing data amountsof different types.
 6. The unauthorized communication detection methodaccording to claim 1, wherein the communication pattern is a modelobtained by executing statistical processing on the information relatingto the plurality of the received messages previously determined asunauthorized, and wherein, in the executing communication patterndetermination, a prediction value of data value included in the one ofthe messages is calculated using the model, and whether or not the oneof the messages matches the communication pattern is determined based ona result of comparison between the prediction value and the data valuethat the message includes.
 7. The unauthorized communication detectionmethod according to claim 6, wherein the model is an autoregressive (AR)model, autoregressive-moving-average (ARMA) model, Hidden Markov Model(HMM), or Bayesian model.
 8. The unauthorized communication detectionmethod according to claim 6, wherein, in the saving, informationrelating to a gray message regarding which determination of whether theone of the messages is unauthorized or not could not be made in theexecuting unauthorized activity detection is further stored in the atleast one memory, and wherein, in the updating, the communicationpattern is updated based on the information relating to the gray messageand the information of relating to the plurality of the receivedmessages previously determined as unauthorized.
 9. The unauthorizedcommunication detection method according to claim 1, wherein the one ofthe messages that is determined as unauthorized is received from thenetwork by one of the one or more electronic control units included inthe onboard network system, and wherein at least part of the executingunauthorized activity detection, the saving, the updating, and theexecuting communication pattern determination is executed by anelectronic control unit included on a different onboard network systemfrom the electronic control unit receiving the one of the messages thatis determined as unauthorized, or by a gateway that the onboard networksystem further includes.
 10. The unauthorized communication detectionmethod according to claim 1, wherein at least one of the one or moreelectronic control units included in the onboard network system has atransmission data obtaining unit that obtains data transmitted fromoutside of the onboard network system, and wherein the electroniccontrol unit having the transmission data obtaining unit executes atleast the executing unauthorized activity detection regarding the one ofthe messages included in data transmitted from outside of the onboardnetwork system.
 11. An unauthorized communication detection system todetect unauthorized control in an onboard network system, the onboardnetwork system including a network and one or more electronic controlunits connected to the network, the unauthorized communication detectionsystem comprising: at least one processor; and one or more memoriesincluding at least one of an instruction that, when executed by the atleast one processor, causes the at least one processor to performoperations including: receiving, over the network, messages transmittedto the onboard network system; determining, in a first determination,whether a plurality of the received messages is unauthorized; storing,in the one or more memories: information relating to the plurality ofthe received messages previously determined as unauthorized in the firstdetermination, and a communication pattern identified based on theinformation relating to the plurality of the received messagespreviously determined as unauthorized; executing unauthorized activitydetection of determining whether or not one of the messages receivedfrom the network is unauthorized, executing communication patterndetermination of determining whether or not the one of the messagesmatches the communication pattern; saving information relating to themessage in the one or more memories in a case where the one of themessages is unauthorized in the executing unauthorized activitydetection, updating the communication pattern based on informationrelating to the one of the messages and the information relating to theplurality of received messages previously determined as unauthorized,and recognizing whether or not an automatic driving function that avehicle in which the onboard network system is installed has, forassisting or substituting at least part of driving actions of thevehicle by the driver, is being executed, wherein a second, finaldetermination as to whether or not the message is unauthorized isperformed based on both a result of the executing unauthorized activitydetection and the executing communication pattern determination, whereinthe saving is executed when recognition is made in the recognizing thatthe automatic driving function is not being executed, and wherein theexecuting communication pattern determination is executed whenrecognition is made in the recognizing that the automatic drivingfunction is being executed.
 12. At least one non-transitorycomputer-readable recording medium storing a program causing anunauthorized communication detection system to detect unauthorizedcommunication in an onboard network system, the unauthorizedcommunication detection system including at least one processor and atleast one memory, the onboard network system including a network and oneor more electronic control units connected to the network, the program,when executed by the at least one processor, causes the at least oneprocessor to perform operations including: receiving, over the network,messages transmitted to the onboard network system; determining, in afirst determination, whether a plurality of the received messages isunauthorized; storing, in the at least one memory: information relatingto the plurality of the received messages previously determined asunauthorized in the first determination, and a communication patternidentified based on the information relating to the plurality of thereceived messages previously determined as unauthorized; executingunauthorized activity detection of determining whether or one of themessages received from the network is unauthorized, executingcommunication pattern determination of determining whether or not theone of the messages matches the communication pattern; savinginformation relating to the message in the at least one memory in a casewhere the one of the messages is unauthorized in the executingunauthorized activity detection, updating the communication patternbased on information relating to the one of the messages and theinformation relating to the plurality of received messages previouslydetermined as unauthorized, and recognizing whether or not an automaticdriving function that a vehicle in which the onboard network system isinstalled has, for assisting or substituting at least part of drivingactions of the vehicle by the driver, is being executed, wherein asecond, final determination as whether or not the message isunauthorized is performed based on both a result of the executingunauthorized activity detection and the executing communication patterndetermination, wherein the saving is executed when recognition is madein the recognizing that the automatic driving function is not beingexecuted, and wherein the executing communication pattern determinationis executed when recognition is made in the recognizing that theautomatic driving function is being executed.